<html>
<#include "../common/header.ftl">

<body>
<div id="wrapper" class="toggled">

<#--边栏sidebar-->
    <#include "../common/nav.ftl">

<#--主要内容content-->
    <div id="page-content-wrapper">
        <div class="container-fluid">
            <div class="row clearfix">
                <div class="col-md-12 column">
                    <form method="get" action="/site/configure/index" >
                        <input  type="hidden" value="" id="configType" name="configType" />
                        <button type="submit" class="btn btn-default" >新增</button>
                    </form>

                    <table class="table table-bordered table-condensed">
                        <thead>
                        <tr>
                            <th>类目id</th>
                            <th>名字</th>
                            <th>创建时间</th>
                            <th>修改时间</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>

                        <#list configureList as configure>
                        <tr>
                            <td>${configure.categoryId}</td>
                            <td>${configure.categoryName}</td>
                            <td>${configure.createTime}</td>
                            <td>${configure.updateTime}</td>
                            <td><a href="/site/configure/index?categoryId=${configure.categoryId}">修改</a></td>
                        </tr>
                        </#list>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>

</div>
<script type="text/javascript">


    var param = getUrlParam("type");
    console.log(param);
    $('#configType').val(param);




    function getUrlParam(key){
        var url = window.location.search;
        var reg = new RegExp("(^|&)"+ key +"=([^&]*)(&|$)");
        var result = url.substr(1).match(reg);
        return result ? decodeURIComponent(result[2]) : null;
    }

</script>
</body>
</html>